﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Web;

namespace Ev_OneChain.Tools
{
    public class toolsMD5
    {
        /// <summary>
        /// MD5加密方法
        /// </summary>
        /// <param name="str">传入一个字符串</param>
        /// <returns></returns>
        public static string GetMd5(string str)
        {
            System.Security.Cryptography.MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            string a = BitConverter.ToString(md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(str)));
            a = a.Replace("-", "");
            return a.ToUpper();
        }
    }
}